package com.atguigu05.method_more.args;

public class StringCon {
    public static void main(String[] args) {
        StringCon stringCon=new StringCon();
        System.out.println(stringCon.Con("-", "nihao", "lishuyu", "谢谢"));


    }

    public String Con(String operater,String...strings){
        String result="";
        for (int i = 0; i < strings.length; i++) {
            if(i==0){
                result+=strings[0];
            }else{
                result+=operater+strings[i];
            }
        }
        return result;
    }
}
